package com.dmt.view
{
	import com.dougmccune.containers.CoverFlowContainer;
	
	import mx.controls.HSlider;
	import mx.core.Application;
	import mx.events.FlexEvent;
	import mx.events.IndexChangedEvent;
	import mx.events.SliderEvent;
	
	public class Main extends Application
	{
		public var coverflow:CoverFlowContainer = new CoverFlowContainer;
		public var scrollbar:HSlider = new HSlider;
		
		public function Main()
		{
			this.addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete, false, 0, true);
		}
		
		private function onCreationComplete(e:FlexEvent):void
		{
			setHandlers();
			getProvider();
		}
		
		private function setHandlers():void
		{
			
		}
		
		private function getProvider():void
		{
			
		}
		
		protected function changeCover(e:SliderEvent):void
		{
			coverflow.selectedIndex = e.value;
		}
		protected function changeSlider(e:IndexChangedEvent):void
		{
			scrollbar.value = e.newIndex;
		}
	}
}